The present invention relates to information technology, and more specifically, to the generation of source code from formal descriptions that can be compiled and linked, creating an executable program.
In applications performing compiler constructions those formal descriptions are defined in terms of context-free grammars. Such tools take a definition of context-free grammar usually in Backus-Naur Form (BNF) and generate a source code of compiler components; and that compiler is able to process source code according to the input grammar definition. Such tools are called compiler compilers or compiler generators. One of the earliest and still most common form of compiler compiler is a parser generator. In this case, the compiler compiler takes a grammar definition and generates parser source code. Also, a traditional compiler compiler generating parser source code from a grammar specification has another component that takes regular expressions and generates a tokenizer capable of processing specified tokens as a sequence of characters.
Compiler compilers as parser and tokenizer generators have been implemented since the late 1960's.
When a generated parser executes its actions during parsing a source program in accordance with a language grammar, it builds some form of parsing tree. A developer who implements a compiler based on conventional compiler compiler technology is responsible for writing code in terms of a parsing tree and some attributes assigned to parsing tree nodes.
An ideal compiler compiler is supposed to take an input grammar specification and generate source code in automatic mode without any further manual procedures. Unfortunately this is far from what current information technology can offer in compiler compiler products available for developers.